package com.example.demo.service.user;

import com.example.demo.po.user.User;
import com.example.demo.vo.ResultVO;
import com.example.demo.vo.StrategyVO;
import com.example.demo.vo.task.TaskVO;
import com.example.demo.vo.user.UserRoleVO;
import com.example.demo.vo.user.UserVO;
import com.example.demo.vo.user.WorkerTaskVO;

import java.util.List;

public interface UserService {

    // 用户注册
    ResultVO<UserVO> userRegister(UserVO userVO);
    // 用户登录验证
    ResultVO<UserRoleVO> userLogin(UserVO userVO);
    // 根据id查找用户
    ResultVO<UserVO> getUser(String username);
    //根据用户名查找任务状态
    ResultVO<WorkerTaskVO> getTakeTaskState(String username,int tid);
    //
    ResultVO<WorkerTaskVO> setTakeTaskState(WorkerTaskVO workerTaskVO);

    User getUserByName(String username);

    ResultVO<StrategyVO> submitStrategy(StrategyVO strategyVO);

    ResultVO<StrategyVO> getCurrentStrategy();

    String getNameByUid(int uid);

    ResultVO<List<TaskVO>> getRecommendTaskByUser(String username);

    void updateDevice(String username,int deviceInfo);

    void updateAbility(String username,int difficulty);

    void updateTakeTaskNum(String username);

    double calculateActive(String username);

//用于测试
    String test();

    List<User> getAllWorkers();

    List<Integer> getReportIdByWorker(int uid);
}
